<template>
  <view class="post-detail-container">
    <!-- 帖子内容 -->
    <view class="post-content">
      <!-- 用户信息 -->
      <view class="post-header">
        <view class="user-info" @click="viewUserProfile">
          <u-avatar :src="post.authorAvatar" size="45"></u-avatar>
          <view class="user-details">
            <text class="user-name">{{ post.authorName }}</text>
            <text class="post-time">{{ formatTime(post.createdAt) }}</text>
          </view>
        </view>
        
        <view class="header-actions">
          <u-button 
            v-if="!post.isFollowing && post.authorId !== currentUserId"
            type="primary"
            size="small"
            class="follow-btn"
            @click="toggleFollow"
          >
            {{ post.isFollowing ? '已关注' : '关注' }}
          </u-button>
          
          <u-icon 
            name="more-dot-fill" 
            size="22" 
            color="#999" 
            @click="showPostMenu"
          ></u-icon>
        </view>
      </view>
      
      <!-- 帖子正文 -->
      <view class="post-body">
        <text v-if="post.title" class="post-title">{{ post.title }}</text>
        <text class="post-text">{{ post.content }}</text>
        
        <!-- 话题标签 -->
        <view v-if="post.topics && post.topics.length > 0" class="post-topics">
          <text 
            v-for="(topic, index) in post.topics" 
            :key="index"
            class="topic-tag"
            @click="viewTopic(topic)"
          >
            #{{ topic.name }}
          </text>
        </view>
        
        <!-- 图片展示 -->
        <view v-if="post.images && post.images.length > 0" class="post-images">
          <view 
            class="image-grid"
            :class=